package com.kernel;

/****************************************
 * @name Factory
 * @description 工厂类
 * @author 黄彬恒
 * @since 2018/7/16
 ***************************************/
class Factory {
    static Fruit getInstance(String className) {
        Fruit fruit = null;
        try {
            fruit = (Fruit) Class.forName(className).newInstance();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return fruit;
    }
}
